<?php
/*
 * estudo de padrões de projetos com php
 * author: fabricio s costa
 * version: 1.0
 * site: http://fabriciojf.com
 */

//segurança
require_once('com/fabriciojf/security/Permission.class.php');
Permission::requireInRole(array('admin'));
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>JumboCms Administra&ccedil;&atilde;o</title>
        <link rel="shortcut icon" href="templates/themes/adm-default/images/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" href="templates/themes/adm-default/style.css" media="all" type="text/css" />
        <script type="text/javascript" src="templates/wysiwyg/tiny_mce.js"></script>
        <script type="text/javascript" src="templates/wysiwyg/tiny.js"></script>
        <script type="text/javascript" src="com/fabriciojf/include/menu.js"></script>
        <script type="text/javascript" src="com/fabriciojf/include/lib-fab-util.js"></script>
    </head>
    <body>
    <div id="header">
    </div>

    <div id="menu-superior">
        <span>JumboCms</span> - Sistema de Gerenciamento de Conte&uacute;do - <span>Altera&ccedil;&atilde;o de Post</span>
    </div>

    <div id="content-admin">&nbsp;
        {$menusuperior}
        <form id="formulario" action="do.php?action=AlterarPost" method="post">
            <input type="hidden" value="{$idPost}" name="idPost" />
            <table>
                <tr>
                    <th colspan="2" class="titulo">Edi&ccedil;&atilde;o de Post</th>
                </tr>
                <tr>
                    <th>T&iacute;tulo</th>
                    <td class="texto"><input type="text" class="campo" name="titulo" value="{$titulo}" style="width:95%;"/></td>
                </tr>
                <tr>
                    <th>Categoria</th>
                    <td class="texto">
                        <select name="tipo"  class="campo">
                            {if $tipoPost == 'post'}
                            <option selected value="post">post</option>
                            <option value="page">page</option>
                            <option value="inat">inat</option>
                            {elseif $tipoPost == 'page'}
                            <option value="post">post</option>
                            <option  selected  value="page">page</option>
                            <option value="inat">inat</option>
                            {else}
                            <option value="post">post</option>
                            <option value="page">page</option>
                            <option selected value="inat">inat</option>
                            {/if}
                        </select>
                    </td>
                </tr>
                <tr>
                    <th colspan="2">Conte&uacute;do</th>
                </tr>
                <tr>
                    <td colspan="2" class="texto"><textarea rows="30" name="conteudo">{$conteudo}</textarea></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" class="botao" name="redirect" value="Publicar" onclick="java_script:doPost('formulario');">
                        <input type="submit" class="botao" name="redirect" value="Salvar" onclick="java_script:doPost('formulario');">
                        <input type="submit" class="remover" name="redirect" value="Remover" onclick="java_script:doPost('formulario');">
                        <a href="do.php?action=AlterarPost&idPost={$idPost}&redirect=Visualizar" class="visualizar" target="visjumbo">Visualizar Postagem</a>
                    </td>
                </tr>
            </table>
            <div class="clear"></div>
        </form>
        &nbsp;
    </div>
    <div id="footer-content">
        <div id="bloco">
            <span>Recursos do Site</span>
            <ul>
                {section name=i loop=$menuon}
                <li>{$menuon[i]}</li>
                {/section}
            </ul>
        </div>
        <div id="bl2">
            <span>Links Internos</span>
            <ul>
                <li><a href="#">Localizar no Site</a></li>
                {section name=i loop=$menupage}
                <li>{$menupage[i]}</li>
                {/section}
            </ul>
        </div>
        <div id="bl2">
            <span>JumboCms</span>
            <ul>
                <li><a href="http://fabriciojf.com">Suporte Jumbo</a></li>
                <li><a href="mailto:fabriciojf@gmail.com">Entre em Contato</a></li>
            </ul>
            <span>Sobre o Autor</span>
            <ul>
                <li><a href="http://fabriciojf.com">Sobre o Autor</a></li>
            </ul>
        </div>
        <div class="clear"></div>
    </div>
    <div id="fim-footer"></div>
    <div id="margin-bottom">
        <p>JumboCMS by Fabricio S Costa. Todos os Direitos Reservados. <br />
        Theme By <a href="http://fabriciojf.com">fabriciojf</a></p>
    </div>
</html>
